//
//  AXChangePasswordVC.m
//  AnXin100
//
//  Created by 天质弘耕 on 2018/11/14.
//  Copyright © 2018 tzhg. All rights reserved.
//

#import "AXChangePasswordVC.h"
#import "UIView+SDAutoLayout.h"
#import "ZXCategories.h"
#import "AXLoginViewController.h"
#import "HBDNavigationController.h"
#import "UIViewController+HBD.h"
#import "ZXAccomplishFindPasswordVC.h"

@interface AXChangePasswordVC ()
/** title */
@property (nonatomic ,strong) UILabel *titleLabel;

/**  手机图标*/
@property (nonatomic, strong) UIImageView *sjImageview;
/** 手机号码 */
@property (nonatomic ,strong) UITextField *sjTextField;
/**  获取验证码按钮*/
@property (nonatomic ,strong) UIButton *hqyzmButton;
/** 验证码图标 */
@property (nonatomic ,strong) UIImageView *yzmImageview;
/** 验证码TextField */
@property (nonatomic ,strong) UITextField *yzmTextField;


@end

@implementation AXChangePasswordVC

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor whiteColor];
    
    //客服按钮
    UIButton *backBtn = [UIButton buttonWithType:UIButtonTypeCustom];
    [backBtn setImage:[UIImage imageNamed:@"back"] forState:UIControlStateNormal];
    backBtn.frame = CGRectMake(0, 0, 30, 30);
    [backBtn addTarget:self action:@selector(back:) forControlEvents:UIControlEventTouchUpInside];
    UIBarButtonItem *rightItem = [[UIBarButtonItem alloc]initWithCustomView:backBtn];
    self.navigationItem.leftBarButtonItem = rightItem;
    
    /** 搜索 */
    self.titleLabel = [[UILabel alloc]initWithFrame:CGRectMake(0, 0, 100, 30)];
    self.titleLabel.text = @"找回密码";
    self.titleLabel.textAlignment = NSTextAlignmentCenter;
    self.titleLabel.font = FONT_EIGHTEEN;
    self.titleLabel.textColor = [UIColor colorWithHex:0x29b566];
    self.navigationItem.titleView = self.titleLabel;
    
    [self creatView];
    [self setlayout];
}

- (void)setupNavigationItems {
    
    self.hbd_barTintColor = [UIColor whiteColor];
    self.hbd_barShadowHidden = YES;
    
    //返回按钮
    UIButton *kfBtn = [UIButton buttonWithType:UIButtonTypeCustom];
    [kfBtn setImage:[UIImage imageNamed:@"back"] forState:UIControlStateNormal];
    kfBtn.frame = CGRectMake(0, 0, 30, 30);
    [kfBtn addTarget:self action:@selector(backAction:) forControlEvents:UIControlEventTouchUpInside];
    UIBarButtonItem *leftItem = [[UIBarButtonItem alloc]initWithCustomView:kfBtn];
    self.navigationItem.leftBarButtonItem = leftItem;
    
    /** title */
    UILabel *titleLabel = [[UILabel alloc]init];
    titleLabel = [[UILabel alloc]initWithFrame:CGRectMake(0, 0, 100, 30)];
    titleLabel.text = @"修改密码";
    titleLabel.textAlignment = NSTextAlignmentCenter;
    titleLabel.font = FONT_FOURTEEN;
    titleLabel.textColor = [UIColor colorWithHex:0x29b566];
    self.navigationItem.titleView = titleLabel;
    
    //下一步
    //客服按钮
    UIButton *backBtn = [UIButton buttonWithType:UIButtonTypeCustom];
    [backBtn setImage:[UIImage imageNamed:@"back"] forState:UIControlStateNormal];
    backBtn.frame = CGRectMake(0, 0, 30, 30);
    [backBtn addTarget:self action:@selector(back:) forControlEvents:UIControlEventTouchUpInside];
    UIBarButtonItem *rightItem = [[UIBarButtonItem alloc]initWithCustomView:backBtn];
    self.navigationItem.leftBarButtonItem = rightItem;
   
    
}


- (void)creatView {
    
    /** 手机号码Imageview */
    self.sjImageview = [[UIImageView alloc]init];
    self.sjImageview.image = [UIImage imageNamed:@"sjhm"];
    [self.view addSubview:self.sjImageview];
    
    /** 手机号码TextField */
    self.sjTextField = [[UITextField alloc]init];
    self.sjTextField.textColor = [UIColor colorWithHex:0x999999];
    self.sjTextField.cornerRadius = 10;
    self.sjTextField.backgroundColor = [UIColor colorWithHex:0xf8f8f8];
    self.sjTextField.placeholder = @" 请输入手机号码";
    [self.view addSubview:self.sjTextField];
    
    /** 获取验证码 */
    self.hqyzmButton = [[UIButton alloc]init];
    [self.hqyzmButton addTarget:self action:@selector(hqyzm:) forControlEvents:UIControlEventTouchUpInside];
    [self.hqyzmButton setTitleColor:COLOR_GREEN forState:UIControlStateNormal];
    [self.hqyzmButton setTitle:@"获取验证码" forState:UIControlStateNormal];
    self.hqyzmButton.titleLabel.font = FONT_SIXTEEN;
    [self.view addSubview:self.hqyzmButton];
    
    /** 验证码mageview */
    self.yzmImageview = [[UIImageView alloc]init];
    self.yzmImageview.image = [UIImage imageNamed:@"sjyz"];
    [self.view addSubview:self.yzmImageview];
    /** 验证码TextField */
    self.yzmTextField = [[UITextField alloc]init];
    self.yzmTextField.cornerRadius = 10;
    self.yzmTextField.placeholder = @" 请输入验证码";
    self.yzmTextField.backgroundColor = [UIColor colorWithHex:0xf8f8f8];
    self.yzmTextField.textColor = [UIColor colorWithHex:0x999999];
    [self.view addSubview:self.yzmTextField];
    
   
   
}

- (void)setlayout {
    
    
    
    /** 手机号码imageview*/
    self.sjImageview.sd_layout
    .leftSpaceToView(self.view, 50)
    .topSpaceToView(self.view, 155)
    .widthIs(30)
    .heightIs(30);
    /** 手机号码TextField*/
    self.sjTextField.sd_layout
    .leftSpaceToView(self.sjImageview, 10)
    .topSpaceToView(self.view, 150)
    .widthIs(SCREEN_WIDTH-180)
    .heightIs(40);
    /** 获取验证码 */
    self.hqyzmButton.sd_layout
    .rightSpaceToView(self.view, 50)
    .topSpaceToView(self.sjTextField, 0)
    .widthIs(100)
    .heightIs(40);
    /** 请输入验证码imageview*/
    self.yzmImageview.sd_layout
    .leftSpaceToView(self.view, 50)
    .topSpaceToView(self.hqyzmButton, 5)
    .widthRatioToView(self.sjImageview, 1)
    .heightRatioToView(self.sjImageview, 1);
    /** 请输入验证码TextField*/
    self.yzmTextField.sd_layout
    .leftSpaceToView(self.yzmImageview, 10)
    .topSpaceToView(self.hqyzmButton, 0)
    .widthRatioToView(self.sjTextField, 1)
    .heightRatioToView(self.sjTextField, 1);
    
  
}

#pragma mark - Action

-(void)back:(UIButton *)btn {
    
    [self.navigationController popViewControllerAnimated:YES];
    
}

- (void)hqyzm:(UIButton *)btn {
    
}



@end
